package com.baidu.fd1931springbootdemo.service.impl;

import com.baidu.fd1931springbootdemo.bean.User;
import com.baidu.fd1931springbootdemo.dao.LoginDao;
import com.baidu.fd1931springbootdemo.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginDao loginDao;

    @Override
    public Boolean loginService(User user) {
        User loginUser = loginDao.loginDao(user);
        if (loginUser!=null) {
//           拿到用户和密码的值
            System.out.println("loginUser = " + loginUser);
            return true;
        }
        return false;
    }
}
